%basic_dark_colors:- [black, darkBlue, darkGrey, brown]
color_list(basic_dark_colors, [black, darkBlue, darkGrey, brown]).
color_list(basic_dark_colors2, [black2, darkBlue2, darkGrey2, brown2]).
color_list(basic_dark_colors3, [black3, darkBlue3, darkGrey3, brown3]).

cloth(dresses, dress1, darkBlue, long, summer, pois).
cloth(dresses, dress4, darkBlue, long, summer, pois).
cloth(dresses, dress2, darkBlue, short, summer, pois).
cloth(dresses, dress3, darkGreen, short, summer, pois).
cloth(shirt, dress1, darkBlue, long, summer, pois).
cloth(jackets, jackets1, darkBlue, short, summer, pois).
cloth(jackets, jackets2, darkBlue, short, summer, pois).
cloth(trousers, dress3, darkGreen, short, summer, pois).
dressesClothes(Name) :- cloth(dresses,Name, Color,_,_,_), Color \== darkBlue, if_else.

test(X) :- X=[cloth(a,b,c), cloth(x,y,z)].

%if_else:- cloth(dresses,dr)
categories(dresses).

rule(jackets, cloth(dresses, Name, Color, long, Season, Extra), L) :- bagof(cloth(jackets,B,C,short,E,F), cloth(jackets,B,C,short,E,F), L).

rules_jacket(Category) :- rules_jacket(Category), write('rules_jacket(_)').
rules_jacket(dresses) :- write('rules_jacket(dresses)').

listsplit([H|T], H, T).


class(bella, a, vow). 
class(brutta,b, con). 
class(bella,c, con). 
class(bella,d, con). 
class(brutta,e, vow). 
class(brutta,f, con).
bagof( [Letter,Class], class( bella, Letter, Class), Letters).

%un set di regole per ogni cartegoria 
dressesClothes(Name) :- cloth(dresses,Name, Color,_,_,_), Color \== darkBlue, if_else.

if_else:- cloth(dresses,Name,_,Length,_,_), Length == long, cloth(jackets,Name,_,Length,_,_),
Length == short, cloth(overcoats,Name,_,Length,_,_), Length == short. 

